<template>
  <el-dialog
      :visible.sync="info.show"
      destroy-on-close
      :close-on-click-modal="false"
      :width="info.width"
      top="50px"
      :append-to-body="true"
  >
    <template slot="title">
      <div class="custom-dialog-title">
        <div class="title-container">
          <div class="title">{{info.title}}</div>
          <div class="sub-title">{{info.subTitle}}</div>
          <i class="el-icon-close close" @click="close"></i>
        </div>
      </div>
    </template>
    <div class="dialog-content">
      <slot></slot>
    </div>
  </el-dialog>
</template>
<script>
export default {
  props:['info'],
  data(){
    return{

    }
  },
  methods: {
    close() {
      this.info.show = false
    }
  }
}
</script>
<style lang="scss">
.el-dialog__headerbtn{
  display: none !important;
}
//自定义elementUi dialog样式
.el-dialog {
  background: rgba(0, 0, 0, 0);
  padding: 0;

  .el-dialog__header {
    padding: 0;
  }

  .el-dialog__body {
    padding: 0;
  }

  .custom-dialog-title {
    width: 100%;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    .title-container {
      width: 100%;
      height: 40px;
      background: rgba(56, 55, 55, 0.5);
      backdrop-filter: blur(10px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 20px;

      .title {
        font-family: fzhzgbjianti;
        color: #fff;
        font-size: 17px;
        font-weight: bold;
      }

      .sub-title {
        color: #fff;
        flex-grow: 1;
        font-size: 14px;
        margin-left: 20px;
      }

      .el-icon-close {
        cursor: pointer;
        color: #fff;
        font-size: 20px;
      }
    }
  }

  .dialog-content {
    padding: 15px;
    width: 100%;
    max-height: 900px;
    overflow-y: auto;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(20px);
  }
}
</style>
